package week;

import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        System.out.print("请输入一个yyyy-MM-dd格式的日期：");
        Scanner sc = new Scanner(System.in);
        Week wd = new Week();
        String sdate = sc.next();
        if(wd.isDateFormat(sdate)) {
            if(wd.isValid(sdate)) {
                System.out.println(wd.getWeekDay());
            } else {
                System.out.println("日期非法");
            }
        }else {
            System.out.println("日期格式不正确");
        }
    }
}
